﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Uc_Product_NewProductByGroupProduct : System.Web.UI.Page
{
    int _startRowIndex = 0;
    int _pageSize = 5;
    int _thisPage = 1;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HandleRequestObjects();
            GetData();
        }
    }
    private void GetData()
    {
        int recordsStart = _startRowIndex;
        int recordsEnd = _pageSize;//So recoreds can lay
        int totalCount = 100;
        Paging p = new Paging();
        Literal1.Text = p.DoPaging(1, totalCount, 5, "NewProductByGroupProduct.aspx");
    }
    private void HandleRequestObjects()
    {
        try
        {
            // check for paging
            if (Request.Form["startRowIndex"] != null && Request.Form["thisPage"] != null)
            {
                _startRowIndex = int.Parse(Request.Form["startRowIndex"].ToString());
                _thisPage = int.Parse(Request.Form["thisPage"].ToString());
            }

        }
        catch (Exception ee)
        {
            throw ee;
        }
    }
}